home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SPLINE(1) GNU Plotting Utilities SPLINE(1)
-
-
- NNAAMMEE
- spline - interpolate datasets using splines under tension
-
- SSYYNNOOPPSSIISS
- sspplliinnee [ _o_p_t_i_o_n_s ] [ _f_i_l_e_s ]
-
- DDEESSCCRRIIPPTTIIOONN
- sspplliinnee reads datasets from standard input or from one or
- more files, and fits a smooth curve (a "spline") through
- each dataset. An interpolated version of each dataset,
- consisting of points from the smooth curve, is written to
- standard output.
-
- Unless the --aa or --AA options are used (see below), each
- dataset should be a sequence of values for a vector-valued
- function of a single scalar variable. That is, each
- dataset should be a sequence of data points, given as
- alternating _t and _y values. _t is a scalar independent
- variable, and _y is a vector-valued dependent variable.
- The dimensionality of _y is specified with the --dd option
- (the default dimensionality is 1). Between each data
- point and the next, _t should increase.
-
- An input file may contain more than a single dataset. If
- an input file is in ASCII format (the default), its
- datasets should be separated by blank lines. The _t and _y
- values of the data points in each dataset may be arranged
- arbitrarily, so long as they are separated by white space.
- Besides datasets, an input file may contain any number of
- comment lines, which should begin with the comment charac
- ter `#'. Comment lines are ignored. They are not treated
- as blank, i.e., they do not interrupt a dataset in
- progress.
-
- Options and file names may be interspersed on the command
- line, but the options are processed before the file names
- are read. If ---- is seen, it is interpreted as the end of
- the options. If no file names are specified, or the file
- name -- is encountered, the standard input is read.
-
- The type of interpolation, and the format of the input and
- output files, may be selected by command-line options.
-
- OOPPTTIIOONNSS
- IInntteerrppoollaattiioonn--RReellaatteedd OOppttiioonnss
- --ff
- ----ffiilltteerr
- Use a local interpolation algorithm (the cubic
- Bessel algorithm), so that sspplliinnee can be used as a
- real-time filter. The slope of the interpolating
- curve at each point in a dataset will be chosen by
- fitting a quadratic function through that point and
- the two adjacent points in the dataset. If --ff is
- specified then the --tt option, otherwise optional,
-
-
-
- FSF Dec 1998 1
-
-
-
-
-
- SPLINE(1) GNU Plotting Utilities SPLINE(1)
-
-
- must be used as well. Also, if --ff is specified
- then the --kk, --pp, and --TT options may not be used.
-
- If --ff is _n_o_t specified, then the default (global)
- interpolation algorithm will be used.
-
- --kk _k
- ----bboouunnddaarryy--ccoonnddiittiioonn _k
- Set the boundary condition parameter for each con
- structed spline to be _k. (The default value is
- 1.0.) In each of its components, the spline will
- satisfy the two boundary conditions y"[0]=ky"[1]
- and y"[n]=ky"[n-1]. Here y[0] and y[1] signify the
- values of a specified component of the vector-val
- ued dependent variable _y at the first two points of
- a dataset, and y[n-1] and y[n] the values at the
- last two points. Setting _k to zero will yield a
- "natural" spline, i.e., one that has zero curvature
- at the two ends of the dataset. The --kk option may
- not be used if --ff or --pp is specified.
-
- --nn _n
- ----nnuummbbeerr--ooff--iinntteerrvvaallss _n
- Subdivide the interval over which interpolation
- occurs into _n subintervals. The number of data
- points computed, and written to the output, will be
- _n_+_1. The default value for _n is 100.
-
- --pp
- ----ppeerriiooddiicc
- Construct a periodic spline. If this option is
- specified, the _y values for the first and last
- points in each dataset must be equal. The --ff and
- --kk options may not be used if --pp is specified.
-
- --TT _t_e_n_s_i_o_n
- ----tteennssiioonn _t_e_n_s_i_o_n
- Each interpolating curve will be a spline under
- tension. This option sets the tension value (the
- default is 0.0).
-
- If _t_e_n_s_i_o_n equals zero, the curve will be a piece
- wise cubic spline. Increasing the tension above
- zero makes the curve "tighter", and reduces the
- likelihood of spurious inflection points. That is
- because between each pair of successive points in a
- dataset, the curve will satisfy the fourth-order
- differential equation
- y""=sgn(_t_e_n_s_i_o_n)*(_t_e_n_s_i_o_n^2)y" in each of its com
- ponents. As _t_e_n_s_i_o_n increases to positive infin
- ity, it will converge to a polygonal line. The --TT
- option may not be used if --ff is specified.
-
-
-
-
-
- FSF Dec 1998 2
-
-
-
-
-
- SPLINE(1) GNU Plotting Utilities SPLINE(1)
-
-
- --tt _t_m_i_n _t_m_a_x _[_t_s_p_a_c_i_n_g_]
- ----tt--ssppaacciinngg _t_m_i_n _t_m_a_x _[_t_s_p_a_c_i_n_g_]
- For each dataset, set the interval over which
- interpolation occurs to be the interval between
- _t_m_i_n and _t_m_a_x. If _t_s_p_a_c_i_n_g is not specified, the
- interval will be divided into the number of subin
- tervals specified by the --nn option.
-
- If the --tt option is not used, the interval over
- which interpolation occurs will be the entire range
- of the independent variable in the dataset. The --tt
- option must always be used if the --ff option is used
- to request filter-like behavior (see above).
-
- FFoorrmmaatt--RReellaatteedd OOppttiioonnss
- --dd _d_i_m_e_n_s_i_o_n
- ----yy--ddiimmeennssiioonn _d_i_m_e_n_s_i_o_n
- Set the dimensionality of the dependent variable _y
- in the input and output files to be _d_i_m_e_n_s_i_o_n. The
- default dimension is 1.
-
- --II _d_a_t_a_-_f_o_r_m_a_t
- ----iinnppuutt--ffoorrmmaatt _d_a_t_a_-_f_o_r_m_a_t
- Set the data format for the input file(s) to be
- _d_a_t_a_-_f_o_r_m_a_t, which may be one of the following.
-
- aa ASCII format (the default). Each file is a
- sequence of floating point numbers, inter
- preted as the _t and _y coordinates of the
- successive data points in a dataset. If _y
- is _d-dimensional, there will be _d_+_1 numbers
- for each point. The _t and _y coordinates of
- a point need not appear on the same line,
- and points need not appear on different
- lines. But if a blank line occurs (i.e.,
- two newlines in succession are seen), it is
- interpreted as the end of a dataset, and the
- beginning of the next.
-
- ff Single precision binary format. Each file
- is a sequence of floating point numbers,
- interpreted as the _t and _y coordinates of
- the successive data points in a dataset. If
- _y is _d-dimensional, there will be _d_+_1 num
- bers for each point. Successive datasets
- are separated by a single occurrence of the
- quantity FLT_MAX, which is the largest pos
- sible single precision floating point num
- ber. On most machines this is approximately
- 3.4x10^38.
-
- dd Double precision binary format. Each file
- is a sequence of double precision floating
- point numbers, interpreted as the _t and _y
-
-
-
- FSF Dec 1998 3
-
-
-
-
-
- SPLINE(1) GNU Plotting Utilities SPLINE(1)
-
-
- coordinates of the successive data points in
- a dataset. If _y is _d-dimensional, there
- will be _d_+_1 numbers for each point. Succes
- sive datasets are separated by a single
- occurrence of the quantity DBL_MAX, which is
- the largest possible double precision float
- ing point number. On most machines this is
- approximately 1.8x10^308.
-
- ii Integer binary format. Each file is a
- sequence of integers, interpreted as the _t
- and _y coordinates of the successive data
- points in a dataset. If _y is _d-dimensional,
- there will be _d_+_1 numbers for each point.
- Successive datasets are separated by a sin
- gle occurrence of the quantity INT_MAX,
- which is the largest possible integer. On
- most machines this is 2^31-1.
-
- --aa _[_s_t_e_p___s_i_z_e _[_l_o_w_e_r___l_i_m_i_t_]_]
- ----aauuttoo--aabbsscciissssaa _[_s_t_e_p___s_i_z_e _[_l_o_w_e_r___l_i_m_i_t_]_]
- Automatically generate values for _t, the indepen
- dent variable (the default values of _s_t_e_p___s_i_z_e and
- _l_o_w_e_r___l_i_m_i_t are 1.0 and 0.0, respectively).
-
- Irrespective of data format (`a', `f', `d', or
- `i'), this option specifies that the values of _t
- are missing from the input file: the dataset(s) to
- be read contain only values of _y, the dependent
- variable. So if _y is _d-dimensional, there will be
- only _d numbers for each point. The increment from
- each _t value to the next will be _s_t_e_p___s_i_z_e, and the
- first _t value will be _l_o_w_e_r___l_i_m_i_t. This option is
- useful, e.g., when interpolating curves rather than
- functions.
-
- --AA
- ----aauuttoo--ddiisstt--aabbsscciissssaa
- Automatically generate values for _t, the indepen
- dent variable. This is a variant form of the --aa
- option. The increment from each _t value to the
- next will be the distance in _d-dimensional space
- between the corresponding _y values, and the first _t
- value will be 0.0. That is, _t will be "polygonal
- arclength". This option is useful when interpolat
- ing curves rather than functions.
-
- --OO _d_a_t_a_-_f_o_r_m_a_t
- ----oouuttppuutt--ffoorrmmaatt _d_a_t_a_-_f_o_r_m_a_t
- Set the data format for the output file to be _d_a_t_a_-
- _f_o_r_m_a_t. The interpretation of _d_a_t_a_-_f_o_r_m_a_t is the
- same as for the --II option. The default is `a',
- i.e., ASCII format.
-
-
-
-
- FSF Dec 1998 4
-
-
-
-
-
- SPLINE(1) GNU Plotting Utilities SPLINE(1)
-
-
- --PP _s_i_g_n_i_f_i_c_a_n_t_-_d_i_g_i_t_s
- ----pprreecciissiioonn _s_i_g_n_i_f_i_c_a_n_t_-_d_i_g_i_t_s
- Set the numerical precision for the _t and _y values
- in the output file to be _s_i_g_n_i_f_i_c_a_n_t_-_d_i_g_i_t_s. This
- takes effect only if the output file is written in
- `a' format, i.e., in ASCII. _s_i_g_n_i_f_i_c_a_n_t_-_d_i_g_i_t_s
- must be a positive integer (the default is 6).
-
- --ss
- ----ssuupppprreessss--aabbsscciissssaa
- Omit the independent variable _t from the output
- file; for each point, supply only the dependent
- variable _y. If _y is _d-dimensional, there will be
- only _d numbers for each point, not _d_+_1. This
- option is useful when interpolating curves rather
- than functions.
-
- IInnffoorrmmaattiioonnaall OOppttiioonnss
- ----hheellpp Print a list of command-line options, and exit.
-
- ----vveerrssiioonn
- Print the version number of sspplliinnee and the plotting
- utilities package, and exit.
-
- EEXXAAMMPPLLEESS
- Typing
-
- eecchhoo 00 00 11 11 22 00 || sspplliinnee
-
- will produce on standard output an interpolated dataset
- consisting of 101 data points. If graphed, this interpo
- lated dataset will yield a parabola.
-
- It is sometimes useful to interpolate between a sequence
- of arbitrarily placed points in _d-dimensional space, i.e.,
- to "spline a curve" rather than a function. The --aa and --ss
- options are used for this. For example,
-
- eecchhoo 00 00 11 00 11 11 00 11 || sspplliinnee --dd 22 --aa --ss
-
- will produce on standard output a 101-point dataset that
- interpolates between the four points (0,0), (1,0), (1,1),
- and (0,1). The --dd 22 option specifies that the dependent
- variable _y is two-dimensional. The --aa option specifies
- that the _t values are missing from the input and should be
- automatically generated. The --ss option specifies that the
- _t values should be stripped from the output.
-
- AAUUTTHHOORRSS
- sspplliinnee was written by Robert S. Maier (rrssmm@@mmaatthh..aarrii
- zzoonnaa..eedduu), starting with an earlier version by Rich Mur
- phey (rriicchh@@ffrreeeebbssdd..oorrgg). The algorithms for constructing
- splines under tension are similar to those used in the
- FITPACK subroutine library, and are ultimately due to Alan
-
-
-
- FSF Dec 1998 5
-
-
-
-
-
- SPLINE(1) GNU Plotting Utilities SPLINE(1)
-
-
- K. Cline (cclliinnee@@ccss..uutteexxaass..eedduu).
-
- SSEEEE AALLSSOO
- "The GNU Plotting Utilities Manual".
-
- BBUUGGSS
- Email bug reports to bbuugg--ggnnuu--uuttiillss@@ggnnuu..oorrgg.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- FSF Dec 1998 6
-
-
-